projects
/
openwrt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[adm5120] use __raw_{readl,writel} routines in the uart driver as well
[openwrt.git]
/
scripts
/
feeds
diff --git
a/scripts/feeds
b/scripts/feeds
index
3c6c050
..
78e65ad
100755
(executable)
--- a/
scripts/feeds
+++ b/
scripts/feeds
@@
-83,7
+83,7
@@
sub update_link($$) {
my $name = shift;
my $src = abs_path(shift);
my $name = shift;
my $src = abs_path(shift);
- system("
ln -sf
$src ./feeds/$name");
+ system("
rm -f ./feeds/$name; ln -s
$src ./feeds/$name");
return 0;
}
return 0;
}
@@
-104,9
+104,15
@@
sub update_git($$) {
sub get_feed($) {
my $feed = shift;
sub get_feed($) {
my $feed = shift;
+ my $file = "./feeds/$feed.index";
clear_packages();
clear_packages();
- parse_package_metadata("./feeds/$feed.index") or return;
+
+ -f $file or do {
+ print "Ignoring feed '$feed' - index missing\n";
+ return;
+ };
+ parse_package_metadata($file) or return;
return { %package };
}
return { %package };
}
@@
-238,15
+244,17
@@
sub install_package {
$feed = lookup_package($feed, $name);
$feed or do {
$installed{$name} and return 0;
$feed = lookup_package($feed, $name);
$feed or do {
$installed{$name} and return 0;
- warn "WARNING: No feed for package '$name' found.\n";
- return 1;
+ # TODO: check if it's already installed within ./package directory
+ 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;
$pkg->{name} or do {
$installed{$name} and return 0;
};
my $pkg = $feed{$feed->[1]}->{$name} or return 1;
$pkg->{name} or do {
$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 $type = $feed->[0];
};
my $src = $pkg->{src};
my $type = $feed->[0];
@@
-256,13
+264,6
@@
sub install_package {
# newly installed packages set the source package
$installed{$src} and return 0;
# newly installed packages set the source package
$installed{$src} and return 0;
- # install all dependencies
- foreach my $dep (@{$pkg->{depends}}) {
- next if $dep =~ /@/;
- $dep =~ s/^\+//;
- install_package($feed, $dep) == 0 or $ret = 1;
- }
-
# check previously installed packages
$installed{$name} and return 0;
$installed{$src} = 1;
# check previously installed packages
$installed{$name} and return 0;
$installed{$src} = 1;
@@
-278,6
+279,13
@@
sub install_package {
return 1;
};
return 1;
};
+ # install all dependencies
+ foreach my $dep (@{$pkg->{depends}}, @{$pkg->{builddepends}}) {
+ next if $dep =~ /@/;
+ $dep =~ s/^\+//;
+ install_package($feed, $dep) == 0 or $ret = 1;
+ }
+
return $ret;
}
return $ret;
}
@@
-327,8
+335,6
@@
sub install {
my $p = $package{$name};
if( $p->{name} ) {
install_package($feed, $p->{name}) == 0 or $ret = 1;
my $p = $package{$name};
if( $p->{name} ) {
install_package($feed, $p->{name}) == 0 or $ret = 1;
- } else {
- warn "WARNING: Package '$name' is not available\n";
}
}
}
}
}
}
This page took
0.024976 seconds
and
4
git commands to generate.