Changeset 50
- Timestamp:
- 03/07/06 17:56:45 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/debbuild
r49 r50 131 131 parse_cmd(); 132 132 133 if ($cmdopts{install}) { 134 install_sdeb(); 135 exit 0; 136 } 137 138 # Stick --rebuild handling in here - basically install_sdeb() 139 # followed by tweaking options to run with -ba 140 133 141 if ($cmdopts{type} eq 'b') { 134 142 # Need to read the spec file to find the tarball. Note that … … 236 244 } elsif (/^-v/) { 237 245 # bump verbosity. Not sure what I'll actually do here... 246 } elsif (/^-i/) { 247 $cmdopts{install} = 1; 248 $prevopt = '-i'; 238 249 } else { 239 250 die "Bad option $_\n"; … … 249 260 if ($prevopt eq '--buildroot') { 250 261 $cmdbuildroot = $_; 262 } elsif ($prevopt eq '-i') { 263 $srcpkg = $_; 251 264 } else { 252 265 if ($cmdopts{type} eq 's') { 253 266 # Source package 254 if (!/ \.src\.(deb|rpm)$/) {267 if (!/(sdeb|\.src\.rpm)$/) { 255 268 die "Can't --rebuild with $_\n"; 256 269 } 270 $srcpkg = $_; 257 271 } elsif ($cmdopts{type} eq 'b') { 258 272 $specfile = $_; … … 971 985 972 986 987 ## install_sdeb() 988 # Extracts .sdeb contents to %_topdir as appropriate 989 sub install_sdeb { 990 my $paxcmd = "cd $topdir; pax -r <$srcpkg; cd -"; 991 992 # In case of %-macros... 993 $paxcmd = expandmacros($paxcmd,'gp'); 994 995 system "$paxcmd"; 996 print "Extracted source package $srcpkg to $topdir.\n"; 997 } # end install_sdeb() 998 999 973 1000 ## expandmacros() 974 1001 # Expands all %{blah} macros in the passed string
Note:
See TracChangeset
for help on using the changeset viewer.