WRAP-AND-SORT(1)
π WRAP-AND-SORT(1) π
the iconic little helper from the General Commands Manual section, bestie π
β¨ NAME β¨
wrap-and-sort β wrap long lines and sort items in Debian packaging files π¦
πΈ SYNOPSIS πΈ
wrap-and-sort [options]
π DESCRIPTION π
okay so picture this: your Debian control files are a mess and you're just standing there like π. Enter wrap-and-sort. It wraps the package lists in Debian control files. By default the lists will only split into multiple lines if the entries are longer than the maximum line length limit of 79 characters. no cap, it's that simple π
It also sorts the package lists in Debian control files, plus all the .dirs, .docs, .examples, .info, .install, .links, .maintscript, and .manpages files. and bestie it doesn't stop there β it also removes trailing spaces in these files. the way that it just cleans everything up for you πβ¨
π«Ά run this script in the root of a Debian package tree. It searches forcontrol,control*.in,copyright,copyright.in,install, and*.installin thedebiandirectory.
π OPTIONS π
-h,--helpβ show this help message and exit. It will also print the default values for the options below, so like, very generous of it π₯°-a,--[no-]wrap-alwaysβ wrap all package lists in the Debian control file, even if they don't exceed the line length limit and could totally fit in one line. no holding back π-s,--[no-]short-indentβ indent wrapped lines by a single space, instead of in-line with the field name. cozy little indent π-b,--[no-]sort-binary-packagesβ sort binary package paragraphs by name. alphabetical queen π-k,--[no-]keep-firstβ when sorting binary package paragraphs, leave the first one at the top.
unqualified debhelper(7) configuration files are applied to the first package. (that's the why, bestie, iykyk)
-n,--[no-]cleanupβ remove trailing whitespaces. bye bye invisible chaos π-t,--[no-]trailing-commaβ add a trailing comma at the end of the sorted fields. This minimizes future differences in the VCS commits when additional dependencies are appended or removed. future-you will be obsessed with past-you for this π-dpath,--debian-directory=path β location of the debian directory (default:./debian). π-ffile,--file=file β wrap and sort only the specified file. You can specify this parameter multiple times. All supported files will be processed if no files are specified. picky and valid π-v,--verboseβ print all files that are touched. spill the tea about every single file π’--max-line-length=max_line_length β set the maximum allowed line length. Package lists in the Debian control file that exceed this length limit will be wrapped.
the default maximum line length is 79 characters.
-N,--dry-runβ do not modify any file, instead only print the files that would be modified. look, don't touch β¨--experimental-rts-parserβ temporary option accepted for compatibility with an experiment. It no longer does anything. Please remove any use of it. πͺ¦
β οΈ real talk: that last one is a leftover from an experiment, it does literally nothing now, and you should remove any use of it fr fr.
π AUTHORS π
wrap-and-sort and this manpage have been written by Benjamin Drung <bdrung@debian.org>.
Both are released under the ISC license. π«Ά
and that's the whole page, bestie β this one came out of the Debian Utilities corner of the world, tagged DEBIAN, and it's WRAP-AND-SORT(1) if you ever need to find it again. slay, go format your control files. πβ¨π
π¦ where this page comes from
- debian trixie: devscripts 2.25.15+deb13u1 Β· GPL-2.0-or-later
- epel 10: devscripts 2.25.5-1.el10_1 Β· GPL-2.0-or-later
- epel 9: devscripts 2.25.5-1.el9 Β· GPL-2.0-or-later
- fedora 43: devscripts 2.25.19-2.fc43 Β· GPL-2.0-or-later
- fedora 43: devscripts 2.25.33-1.fc43 Β· GPL-2.0-or-later
- fedora 44: devscripts 2.26.5-1.fc44 Β· GPL-2.0-or-later
- nixos 26.05: debian-devscripts 2.26.8
- nixpkgs unstable: debian-devscripts 2.26.8
- ubuntu questing: devscripts 2.25.19ubuntu2
- ubuntu resolute: devscripts 2.26.7 Β· GPL-2.0-or-later
- ubuntu stonking: devscripts 2.26.11ubuntu1 Β· GPL-2.0-or-later
- Copyright (c) 2010, Benjamin Drung <bdrung@debian.org>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms