mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2024-11-27 17:15:00 +02:00
fix package/symlinks target, will call scripts/feeds update / install
introduce new package/symlinks-install and package/symlinks-clean targets - package/symlink-install will re-create the index files and the symlinks for all ./feeds (no update from repositories is performed) - package/symlink-clean will delete all installed symlinks (keeping the ./feeds untouched) git-svn-id: svn://svn.openwrt.org/openwrt/trunk@10634 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
5f3cd8d563
commit
6830e7b178
16
Makefile
16
Makefile
@ -57,10 +57,20 @@ prepare: .config $(tools/stamp-install) $(toolchain/stamp-install)
|
|||||||
world: prepare $(target/stamp-compile) $(package/stamp-cleanup) $(package/stamp-compile) $(package/stamp-install) $(package/stamp-rootfs-prepare) $(target/stamp-install) FORCE
|
world: prepare $(target/stamp-compile) $(package/stamp-cleanup) $(package/stamp-compile) $(package/stamp-install) $(package/stamp-rootfs-prepare) $(target/stamp-install) FORCE
|
||||||
$(MAKE) package/index
|
$(MAKE) package/index
|
||||||
|
|
||||||
|
# update all feeds, re-create index files, install symlinks
|
||||||
package/symlinks:
|
package/symlinks:
|
||||||
$(SCRIPT_DIR)/feeds update
|
$(SCRIPT_DIR)/feeds update -a
|
||||||
cd package; ln -sf ../feeds/packages openwrt-packages
|
$(SCRIPT_DIR)/feeds install -a
|
||||||
|
|
||||||
.PHONY: clean dirclean prereq prepare world package/symlinks
|
# re-create index files, install symlinks
|
||||||
|
package/symlinks-install:
|
||||||
|
$(SCRIPT_DIR)/feeds update -i
|
||||||
|
$(SCRIPT_DIR)/feeds install -a
|
||||||
|
|
||||||
|
# remove all symlinks, don't touch ./feeds
|
||||||
|
package/symlinks-clean:
|
||||||
|
$(SCRIPT_DIR)/feeds uninstall -a
|
||||||
|
|
||||||
|
.PHONY: clean dirclean prereq prepare world package/symlinks package/symlinks-install package/symlinks-clean
|
||||||
|
|
||||||
endif
|
endif
|
||||||
|
@ -238,15 +238,17 @@ sub install_package {
|
|||||||
$feed = lookup_package($feed, $name);
|
$feed = lookup_package($feed, $name);
|
||||||
$feed or do {
|
$feed or do {
|
||||||
$installed{$name} and return 0;
|
$installed{$name} and return 0;
|
||||||
warn "WARNING: No feed for package '$name' found.\n";
|
# TODO: check if it's already installed within ./package directory
|
||||||
return 1;
|
warn "WARNING: No feed for package '$name' found, maybe it's already part of the standard packages?\n";
|
||||||
|
return 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
my $pkg = $feed{$feed->[1]}->{$name} or return 1;
|
my $pkg = $feed{$feed->[1]}->{$name} or return 1;
|
||||||
$pkg->{name} or do {
|
$pkg->{name} or do {
|
||||||
$installed{$name} and return 0;
|
$installed{$name} and return 0;
|
||||||
|
# TODO: check if this is an alias package, maybe it's known by another name
|
||||||
warn "WARNING: Package '$name' is not available in feed $feed->[1].\n";
|
warn "WARNING: Package '$name' is not available in feed $feed->[1].\n";
|
||||||
return 1;
|
return 0;
|
||||||
};
|
};
|
||||||
my $src = $pkg->{src};
|
my $src = $pkg->{src};
|
||||||
my $type = $feed->[0];
|
my $type = $feed->[0];
|
||||||
@ -327,8 +329,6 @@ sub install {
|
|||||||
my $p = $package{$name};
|
my $p = $package{$name};
|
||||||
if( $p->{name} ) {
|
if( $p->{name} ) {
|
||||||
install_package($feed, $p->{name}) == 0 or $ret = 1;
|
install_package($feed, $p->{name}) == 0 or $ret = 1;
|
||||||
} else {
|
|
||||||
warn "WARNING: Package '$name' is not available\n";
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user