Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 292221 - app-portage/autounmask should be able to unmask sets (introduced in portage 2.2)
Summary: app-portage/autounmask should be able to unmask sets (introduced in portage 2.2)
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it
URL:
Whiteboard:
Keywords: PATCH
: 323375 (view as bug list)
Depends on: 398935
Blocks:
  Show dependency tree
 
Reported: 2009-11-07 06:39 UTC by Andrew
Modified: 2012-03-04 09:29 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew 2009-11-07 06:39:24 UTC
autounmask should be able to handle @sets, but only checks to see if what is passed to it is a true package.

This patch adds the check, so autounmask @kde, or @world will now work.




Reproducible: Always

Steps to Reproduce:
1. autounmask @world
Actual Results:  
can't find package @world

Expected Results:  
<list of things being unmasked>

--- /usr/bin/autounmask	2009-11-07 16:22:57.000000000 +1000
+++ autounmask	2009-11-07 16:22:43.000000000 +1000
@@ -47,6 +47,8 @@
 my %buffers		= ();
 my $pn			= '';
 
+my $isSet		= 0;
+
 # - signal handler >
 $SIG{'INT'} = 'INT_handler';
 $SIG{'HUP'} = 'INT_handler';
@@ -119,6 +121,23 @@
 		}
 	}
 }
+
+# check to see if we have bee asked to emerge a set
+if (index($packageToUnmask, '@')>-1) {
+	print "set specified, checking for validity\n";
+	my $emergeSetsList=`emerge @ 2>&1`;
+	my $sets= substr($emergeSetsList, 67);
+	my $setToEmerge =  substr($packageToUnmask, 2);
+	if(index($sets,$setToEmerge)>-1) {
+		$isOk=1;
+		$isSet=1;
+	}
+
+}
+
 if (!$isOk) {
 	$packageToUnmask.='-'; # Need this if no version is given.
 	my $ebuildName=$pxs->getEbuildName($packageToUnmask);
@@ -196,8 +215,14 @@
 print "\n";
 $pxs->print_ok('Unmasking '.$packageToUnmask." and its dependencies.. this might take a while..\n");
 print "\n";
+
+#needed because the script originally prepends an '=' to the package, which breaks if a set is asked for (=@world is not a package)
+if(!$isSet) {
+	$packageToUnmask="=$packageToUnmask";
+}
+	
 do {
-	$r=`NOCOLOR=true emerge -pe =$packageToUnmask`;
+	$r=`NOCOLOR=true emerge -pe $packageToUnmask`;
 	
 	@l=split(/\n/,$r);
 	undef $p;
Comment 1 Pacho Ramos gentoo-dev 2011-12-14 23:07:15 UTC
*** Bug 323375 has been marked as a duplicate of this bug. ***
Comment 2 Markos Chandras (RETIRED) gentoo-dev 2012-03-04 09:28:49 UTC
package no longer in tree