[arch-general] makepkg nosuchoption succeeds. No complains, package gets built

Eli Schwartz eschwartz at archlinux.org
Fri Apr 23 20:14:18 UTC 2021


On 4/23/21 4:07 PM, u34--- via arch-general wrote:
> I was expecting for
> 
>     makepkg nosuchoption 
> 
> to fail. And complain. Instead, it succeeds. The package seem to get 
> built.

"nosuchoption" is not an --option flag, it is an operand. makepkg
supports e.g.

makepkg CFLAGS+=' -g'

similar to how "make" does. But that won't affect option parsing.

> The package involved is brscan4, from the AUR. All required files were 
> already ownloaded, and in place.
> 
>     LC_ALL=C makepkg nosuchoption 
> 
> PKGBUILD looks to me short and rather simple.
> 
>     $ cat PKGBUILD
>     # Maintainer: Harvey <harv at gmx.de>
>     license=('GPL' 'custom:Brother')
>     arch=('i686' 'x86_64')
>     pkgname=brscan4
>     pkgver=0.4.10_1
>     pkgrel=5
>     pkgdesc="SANE drivers from Brother for brscan4 compatible models"
>     depends=('sane' 'libusb-compat')
>     url="http://support.brother.com"
>     install=brscan4.install
>     
>     [ "$CARCH" = "x86_64" ] && pkg="dlf006648/${pkgname}-${pkgver/_/-}.x86_64.rpm" || pkg="dlf006647/${pkgname}-${pkgver/_/-}.i386.rpm"
>     [ "$CARCH" = "x86_64" ] && pkg_md5sum="f4c4d1f214d4c42a6d40f5451fc40312" || pkg_md5sum="365f1b82ac3b7de73950be76a621bb93"
>     
>     source=("https://download.brother.com/welcome/$pkg"
>     	"agree.html"
>     	mk-udev-hwdb)
>     md5sums=($pkg_md5sum
>     	 'ccffb9a6f6d436b21be25b0241068981'
>     	 '8966d38375d535028a63a6ef5f6104eb')
>     
>     build() {
>       cd "$srcdir"
>       ./mk-udev-hwdb opt/brother/scanner/brscan4/{Brsane4.ini,models4/*.ini} > hwdb
>     }
>     
>     package() {
>       cp -r $srcdir/etc $pkgdir
>       cp -r $srcdir/opt $pkgdir
>       cp -r $srcdir/usr $pkgdir
>       [ "$CARCH" = "x86_64" ] && mv $pkgdir/usr/lib64 $pkgdir/usr/lib
>       install -D -m644 $srcdir/agree.html $pkgdir/usr/share/licenses/$pkgname/LICENSE.html
>       install -D -m644 $srcdir/hwdb $pkgdir/usr/lib/udev/hwdb.d/20-$pkgname.hwdb
>       # move the links to the right direction
>       cd $pkgdir/usr/lib/sane
>       ln -sf libsane-brother4.so.1.0.7 $pkgdir/usr/lib/sane/libsane-brother4.so.1
>       ln -sf libsane-brother4.so.1 $pkgdir/usr/lib/sane/libsane-brother4.so
>     }
> 
> --
> u34
> 


-- 
Eli Schwartz
Bug Wrangler and Trusted User

-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://lists.archlinux.org/pipermail/arch-general/attachments/20210423/7f586eb6/attachment.sig>


More information about the arch-general mailing list