Author: adsb
Date: 2009-08-17 21:27:22 +0000 (Mon, 17 Aug 2009)
New Revision: 1964
Modified:
trunk/debian/changelog
trunk/scripts/dcmd.1
trunk/scripts/dcmd.sh
Log:
dcmd: Add filtering options for udebs. (Closes: #541827)
Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog 2009-08-17 19:03:14 UTC (rev 1963)
+++ trunk/debian/changelog 2009-08-17 21:27:22 UTC (rev 1964)
@@ -25,6 +25,7 @@
now, not the incoming dir.
- Add --dpkg-opts support for passing options on to dpkg.
- Autoclean the apt-cache so it doesn't grow unbounded.
+ * dcmd: Add filtering options for udebs. (Closes: #541827)
* dget: Update the dpkg-source output matching to enable --build to work
again. (Closes: #541409)
* Packaging changes: Add sensible-utils to Recommends. Several scripts
Modified: trunk/scripts/dcmd.1
===================================================================
--- trunk/scripts/dcmd.1 2009-08-17 19:03:14 UTC (rev 1963)
+++ trunk/scripts/dcmd.1 2009-08-17 21:27:22 UTC (rev 1964)
@@ -39,6 +39,15 @@
.B \-\-deb
Select binary packages (.deb files). Implies \-\-archdeb and \-\-indepdeb.
.TP
+.B \-\-archudeb
+Select architecture-dependent udeb binary packages.
+.TP
+.B \-\-indepudeb
+Select architecture-independent udeb binary packages.
+.TP
+.B \-\-udeb
+Select udeb binary packages. Implies \-\-archudeb and \-\-indepudeb.
+.TP
.B \-\-tar, \-\-orig
Select the tar file.
.TP
Modified: trunk/scripts/dcmd.sh
===================================================================
--- trunk/scripts/dcmd.sh 2009-08-17 19:03:14 UTC (rev 1963)
+++ trunk/scripts/dcmd.sh 2009-08-17 21:27:22 UTC (rev 1964)
@@ -73,7 +73,7 @@
}
DSC=1; BCHANGES=1; SCHANGES=1; ARCHDEB=1; INDEPDEB=1; TARBALL=1; DIFF=1
-CHANGES=1; DEB=1
+CHANGES=1; DEB=1; ARCHUDEB=1; INDEPUDEB=1; UDEB=1;
FILTERED=0; FAIL_MISSING=1
while [ $# -gt 0 ]; do
@@ -97,7 +97,8 @@
-1) echo "$PROGNAME: Can't combine --foo and --no-foo options"
>&2;
exit 1;;
0) FILTERED=1; DSC=0; BCHANGES=0; SCHANGES=0; CHANGES=0
- ARCHDEB=0; INDEPDEB=0; DEB=0; TARBALL=0; DIFF=0;;
+ ARCHDEB=0; INDEPDEB=0; DEB=0; ARCHUDEB=0; INDEPUDEB=0
+ UDEB=0; TARBALL=0; DIFF=0;;
esac;;
*) break;;
esac
@@ -115,6 +116,11 @@
{ ARCHDEB=0; INDEPDEB=0; DEB=0; };;
archdeb) [ "$FILTERED" = "1" ] && ARCHDEB=1 || ARCHDEB=0;;
indepdeb) [ "$FILTERED" = "1" ] && INDEPDEB=1 || INDEPDEB=0;;
+ udeb) [ "$FILTERED" = "1" ] &&
+ { ARCHUDEB=1; INDEPUDEB=1; UDEB=1; } ||
+ { ARCHUDEB=0; INDEPUDEB=0; UDEB=0; };;
+ archudeb) [ "$FILTERED" = "1" ] && ARCHUDEB=1 || ARCHUDEB=0;;
+ indepudeb) [ "$FILTERED" = "1" ] && INDEPUDEB=1 || INDEPUDEB=0;;
tar|orig) [ "$FILTERED" = "1" ] && TARBALL=1 || TARBALL=0;;
diff) [ "$FILTERED" = "1" ] && DIFF=1 || DIFF=0;;
*) echo "$PROGNAME: Unknown option '$1'" >&2; exit 1;;
@@ -130,6 +136,7 @@
args="$args $arg"
else
SEEN_INDEPDEB=0; SEEN_ARCHDEB=0; SEEN_SCHANGES=0; SEEN_BCHANGES=0
+ SEEN_INDEPUDEB=0; SEEN_ARCHUDEB=0; SEEN_UDEB=0;
SEEN_TARBALL=0; SEEN_DIFF=0; SEEN_DSC=0
MISSING=0
newarg=""
@@ -145,6 +152,12 @@
elif endswith "$THISARG" .deb; then
[ "$ARCHDEB" = "0" ] || echo "newarg=\"\$newarg $THISARG\";"
echo "SEEN_ARCHDEB=1;"
+ elif endswith "$THISARG" _all.udeb; then
+ [ "$INDEPUDEB" = "0" ] || echo "newarg=\"\$newarg $THISARG\";"
+ echo "SEEN_INDEPUDEB=1;"
+ elif endswith "$THISARG" .udeb; then
+ [ "$ARCHUDEB" = "0" ] || echo "newarg=\"\$newarg $THISARG\";"
+ echo "SEEN_ARCHUDEB=1;"
elif endswith "$THISARG" .tar.gz || \
endswith "$THISARG" .tar.bz2; then
[ "$TARBALL" = "0" ] || echo "newarg=\"\$newarg $THISARG\";"
@@ -206,6 +219,20 @@
fi
fi
+ if [ "$UDEB" = "1" ]; then
+ if [ "$SEEN_INDEPUDEB" = "0" ] && [ "$SEEN_ARCHUDEB" = "0" ];
then
+ MISSING=1; echo "$arg: udeb packages not found" >&2
+ fi
+ else
+ if [ "$INDEPUDEB" = "1" ] && [ "$SEEN_INDEPUDEB" = "0" ]; then
+ MISSING=1; echo "$arg: arch-indep udeb packages not found"
>&2
+ fi
+ if [ "$ARCHUDEB" = "1" ] && [ "$SEEN_ARCHUDEB" = "0" ]; then
+ MISSING=1; echo "$arg: arch-dep udeb packages not found" >&2
+ fi
+
+ fi
+
if [ "$DSC" = "1" ] && [ "$SEEN_DSC" = "0" ]; then
MISSING=1; echo "$arg: .dsc file not found" >&2
fi
--
To unsubscribe, send mail to [email protected].