Fix setMaintainer (#14)

* Fix brackets of maintainer email

The email address of the maintainer must use angle brackes as per https://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-Maintainer
Also there should be a space between name and email.

* Use variable interpolation for maintainer name

Since you already use interpolation for maintainer email you can use it for name too.

* Fix default value for maintainer

The default value for the maintainer still had the square brackets.

* Fix tests for StandardFile

The tests still used square brackets.
This commit is contained in:
Jan-Hendrik Frintrop 2017-07-18 12:06:01 +02:00 committed by Walter Dal Mut
commit c2fa2ffd7f
2 changed files with 5 additions and 5 deletions

View file

@ -44,7 +44,7 @@ class StandardFile
"Recommends" => false,
"Suggests" => false,
"Installed-Size" => 1024,
"Maintainer" => "name [email]",
"Maintainer" => "name <email>",
"Conflicts" => false,
"Replaces" => false,
"Provides" => "your-company",
@ -109,7 +109,7 @@ class StandardFile
public function setMaintainer($maintainer, $email = false)
{
$email = ($email) ? $email : "---";
return $this->_setProperty("Maintainer", $maintainer . "[{$email}]");
return $this->_setProperty("Maintainer", "{$maintainer} <{$email}>");
}
public function setConflicts($conflicts)